<%@page import="org.webcamp.questionary.dto.Question"%>
<%@include file="check_user.jsp"%>
<%@include file="header.jsp"%>

<%
	Question q = (Question) request.getAttribute("question");
%>

<div class="progress">
	<div class="progress-bar" role="progressbar"
		aria-valuemin="0" aria-valuemax="100"
		aria-valuenow="<%=request.getAttribute("progress")%>"
		style="width: <%=request.getAttribute("progress")%>%;">
		<%=request.getAttribute("progress")%>%
	</div>
</div>
<div class="panel panel-default" style="text-align: left;">
	<div class="panel-heading">
		<div class="panel-title">
			<h3><%=q.getText()%></h3>
		</div>
	</div>
	<div class="panel-body">
		<form method="post" role="form" action="question.do">
			<div class="form-group">
				<%
					for (int i = 0; i < q.getAnswers().size(); i++) {
				%>
				<div class="checkbox">
					<label> <input type="checkbox" value="" name="answer<%=i%>"> <%=q.getAnswers().get(i).getText()%>
					</label>
				</div>
				<%
					}
				%>
			</div>
			<button type="submit" class="btn btn-primary">Next</button>
		</form>

	</div>
</div>
<%@include file="footer.jsp"%>
